import request from '@/utils/request'
import scope from './scope'
const apiPrefix = `${process.env.VUE_APP_BASE_API}/${scope}/view/`

// 接口管理
export const getView = (params, config = {}) => {
    return request.get(apiPrefix + params.id, { params: params, ...config })
}
export const getViewList = (params, config = {}) => {
    return request.get(apiPrefix + 'list', { params: params, ...config })
}
export const removeView = (params, config = {}) => {
    return request.delete(apiPrefix + params.id, { params: params, ...config })
}
export const batchRemoveView = (params, config = {}) => {
    return request.delete(apiPrefix + 'ids', { data: params, ...config })
}
export const editView = (params, config = {}) => {
    return request.put(apiPrefix, params, config)
}
export const addView = (params, config = {}) => {
    return request.post(apiPrefix, params, config)
}